package com.jk.garden1.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jk.garden1.dao.LevelDao;
import com.jk.garden1.entity.LevelEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LevelService {
    @Autowired
    private LevelDao levelDao;

    public List<LevelEntity> findLevel(LevelEntity level) {
        QueryWrapper<LevelEntity> wrapper = new QueryWrapper<>();
        wrapper.eq("pid",level.getPid());
        List<LevelEntity> levelEntities = levelDao.selectList(wrapper);
        return levelEntities;
    }
}
